#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

#[tauri::command]
fn navigate_to(url: String) -> Result<String, String> {
    println!("Navigating to: {}", url);
    Ok(url)
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .plugin(tauri_plugin_shell::init())
        .invoke_handler(tauri::generate_handler![navigate_to])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

fn main() {
    run();
}